﻿/*
* ============================================================================
* GNU Lesser General Public License
* ============================================================================
*
* BYDAN - Free Java BYDAN library.
* Copyright (C) 2008 
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
* 
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
* 
* BYDAN Corporation
*/
package ByDan.AulaVirtual.Presentation.Reporte.Source;

import java.util.ArrayList;
import ByDan.Framework.AulaVirtual.Business.Entities.GeneralEntity;
import ByDan.Framework.AulaVirtual.Business.Entities.Mensajes;
import ByDan.Framework.AulaVirtual.Utils.ParameterDbType;
import ByDan.Framework.AulaVirtual.Utils.ParameterType;
import ByDan.Framework.AulaVirtual.Utils.ParametersMaintenance;
import ByDan.Framework.AulaVirtual.Utils.ParameterMaintenance;
import ByDan.Framework.AulaVirtual.Utils.ParameterValue;
import ByDan.Framework.AulaVirtual.Utils.ParametersType;
import ByDan.AulaVirtual.Business.Entities.*;
import ByDan.AulaVirtual.Business.Logic.AlumnoLogic;
import ByDan.AulaVirtual.Business.Logic.AlumnoLogicAdditional;
import ByDan.Framework.AulaVirtual.Utils.DeepLoadType;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import java.sql.*;

public class AlumnoBean extends Alumno
{
	
	
	Object relationship_tutoriasDescripcionReporte;
	Object relationship_respuestasDescripcionReporte;
	Object relationship_unidadcurriculartutorsDescripcionReporte;
	
	
	public Object getRelationship_tutoriasDescripcionReporte()
	{
		return relationship_tutoriasDescripcionReporte;
	}

	public Object getRelationship_respuestasDescripcionReporte()
	{
		return relationship_respuestasDescripcionReporte;
	}

	public Object getRelationship_unidadcurriculartutorsDescripcionReporte()
	{
		return relationship_unidadcurriculartutorsDescripcionReporte;
	}

	
	
	public  void  setRelationship_TutoriaDescripcionReporte(Object tutorias)
	{
		try
		{
			this.relationship_tutoriasDescripcionReporte=tutorias;
		}
		catch(Exception ex)
		{
			;
		}
	}

	public  void  setRelationship_RespuestaDescripcionReporte(Object respuestas)
	{
		try
		{
			this.relationship_respuestasDescripcionReporte=respuestas;
		}
		catch(Exception ex)
		{
			;
		}
	}

	public  void  setRelationship_UnidadCurricularTutorDescripcionReporte(Object unidadcurriculartutors)
	{
		try
		{
			this.relationship_unidadcurriculartutorsDescripcionReporte=unidadcurriculartutors;
		}
		catch(Exception ex)
		{
			;
		}
	}

	
	
	
	
	
				
	public AlumnoBean  ()
    {
 		
 		
 		
    } 
	
	     
    
    
    
	
    
    
    
		
	public static ArrayList<AlumnoBean> TraerAlumnoBeans(ArrayList<Alumno> alumnos)throws Exception
    {
		ArrayList<AlumnoBean> alumnobeans=new ArrayList<AlumnoBean>();	
		AlumnoBean alumnobean;
				
		try
		{
			for(Alumno alumno:alumnos)
			{
			
				alumnobean=new AlumnoBean();
				
				alumnobean.setId(alumno.getId());	
				alumnobean.setVersionRow(alumno.getVersionRow());	
				alumnobean.setField_strCedula(alumno.getField_strCedula());	
				alumnobean.setField_strNombres(alumno.getField_strNombres());	
				alumnobean.setField_strApellidos(alumno.getField_strApellidos());	
				
				
				alumnobean.setRelationship_TutoriaDescripcionReporte(new JRBeanCollectionDataSource(TutoriaBean.TraerTutoriaBeans(alumno.getRelationship_tutorias())));
				alumnobean.setRelationship_RespuestaDescripcionReporte(new JRBeanCollectionDataSource(RespuestaBean.TraerRespuestaBeans(alumno.getRelationship_respuestas())));
				alumnobean.setRelationship_UnidadCurricularTutorDescripcionReporte(new JRBeanCollectionDataSource(UnidadCurricularTutorBean.TraerUnidadCurricularTutorBeans(alumno.getRelationship_unidadcurriculartutors())));	
							
				alumnobeans.add(alumnobean);
			}
		}
		catch(Exception ex)
		{
			throw ex;
		}
		
		return alumnobeans;
    }
}
